package day04;
//利用循环语句while计算数字1到100的和，并输出
public class Exercise3 {
    public static void main(String[] args) {
        int sum = 0;
        int num = 1;
        while(num<=100){
            sum += num;
            num++;
        }
        System.out.println(sum);
    }
}
